
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	
	<div id="myDiv">
    <input type="button" value="Click me" id="myBtn">
</div>
<script type="text/javascript">
    var btn = document.getElementById("myBtn");
    btn.onclick = function(){
        document.getElementById("myDiv").innerHTML = "Processing...";
    }
    var arr = [2,3,4,4,5,2,3,6],
   arr2 = [];
for(var i = 0;i< arr.length;i++){
    if(arr2.indexOf(arr[i]) < 0){
    	console.log('arr是'+arr.indexOf(i))
    	// console.log('0000'+arr2.indexOf(arr[i]));
    	// console.log('arr2是'+arr2);
        arr2.push(arr[i]);
    }
}
console.log(arr2);
</script>

</body>
</html>